package com.ec50n9.server.common

import com.aventrix.jnanoid.jnanoid.NanoIdUtils
import org.hibernate.engine.spi.SharedSessionContractImplementor
import org.hibernate.id.IdentifierGenerator

class NanoIdGenerator : IdentifierGenerator {

    override fun generate(session: SharedSessionContractImplementor?, `object`: Any?) =
        NanoIdUtils.randomNanoId()
}